<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			
			// 练习2:
			// 书上p114 训练1 训练2 训练3
			
			// 训练1 遍历数组，打印出书名是4个字的书
			var arr=new Array("《明史讲义》","《明代社会生活史》","《紫禁城的黄昏》","《国史十六讲》","《停滞的帝国》","《唐朝定居指南》","《明史简述》","《明史十讲》","《大明风物志》","《皇帝与秀才》");
			// 训练2 找出含有0431的电话号码
			var telArr=new Array("1385566****","1560431****","1304316****","1516369****","1580433****","139****0431");
			// 训练3 截取出qq号码
			var email="4006751066@qq.com";
			
			// 训练1
			for(var i=0;i<arr.length;i++)
			{
				var book = arr[i];				
				if(book.length == 6)
				{
					console.log(book);
					document.write(book);
					document.write("<br/>");
				}
			}
			
		</script>
	</body>
</html>